In the Microsoft Windows.TM., Version 3.1, Operating System, sold by Microsoft Corporation of Redmond, Wash., edit controls are rectangular regions of a graphical user interface through which a user may edit or type data. One example of an edit control is a text box, which is a box that allows a user to type input data. FIG. 1 illustrates a single-line text box 101 that accepts a single line of input and a multi-line text box 103 that accepts multiple lines of input. Typically, text boxes are found within dialog boxes, such as dialog box 105. A dialog box is a temporary window the application program displays to allow the user to supply input for a program. The text boxes in a dialog box help the user supply file names, choose options, and otherwise direct the action of a command.
To activate a text box the user moves a cursor 107 into the text box using a pointer positioning device, such as a mouse. Once the text box is activated, the user accepts, edits, deletes, or replaces the data currently displayed in the text box using the pointer positioning device or keyboard. For example, the LEFT ARROW and RIGHT ARROW keys on the keyboard may be used to move the cursor 107 to the position in the text box 101 where data entry is to begin.
When the user enters data in the text box that is too long to fit on the current line of the text box, the text box automatically wraps the data to a new line (if a new line exists) or extends the data beyond a boundary 109 of the text box (if a new line does not exist). For example, in the single-line text box 101, data added to the right hand side of the text box causes data to scroll past the left boundary of the text box. Similarly, data added to the left hand side of the text box causes data to scroll past the right boundary of the text box. In the multi-line text box 103, data added to the bottom of the text box causes data to scroll past the upper boundary of the text box while data added to the top of the text box causes data to scroll past the lower boundary of the text box. When data scrolls beyond one of the boundaries of the text box, the data is no longer visible to the user. To access data which scrolls beyond the boundary 109 of the text box 101, the user positions the cursor 107 on the boundary 109 nearest the hidden data, and activates the mouse; in response, the text box automatically scrolls the previously hidden data into the text box. In response to the previously hidden data being scrolled into the text box, previously visible data is scrolled beyond the boundary 109 and is hidden from view of the user. As a result, the user is never able to view all of the contents of the text box together on the screen. Instead, the user is limited to scrolling portions of the data into and out of the visible portion of the text box.
FIG. 2 is a block diagram of a computer system which processes edit control data. A discussion of the components of the computer system is provided immediately below. Then an example is provided which illustrates how these components interact to provide functionality to the edit controls. The computer system 200 includes a computer 201, a video display 203 and an input device 205. The video display 203 displays a main window 207 and the text box 101 within the main window. The computer 201 includes a processing unit 209, a computer memory 211, and an interface 213 for enabling communication between the processing unit 209 and peripheral devices (e.g., the video display 203 and the input device 205).
The computer memory 211 holds a number of components, including a copy of an operating system 215 such as the Microsoft Windows.TM. Operating System. The operating system 215 provides operating system text box code 217 which performs specified operations for the text box 101. For example, when the user positions an insertion pointer in the text box 101 and enters data using the input device 205, the operating system text box code 217, in cooperation with an application program, displays the entered data in the text box 101. When reference is made to the operating system 215, or a component thereof, performing an operation, those of ordinary skill in the art will understand that the operation is performed by executing the appropriate program code on the processing unit 209. The system queue 225 stores data entered through the input device 205.
The computer memory 211 also includes an application program 219. The application program 219 includes main window code 221 which, in cooperation with the operating system 215, processes user inputs in the main window 207 of the video display 203. The application program 219 also includes application text box code 223 which, in cooperation with the operating system text box code 217, processes user inputs in the text box 101. When reference is made to the application program 219, or components thereof, performing a particular operation, those of ordinary skill in the art will understand that the operation is performed by executing the appropriate program code on the processing unit 209. The message loop code 229 of the main window code 221 retrieves data from the system queue 225 for processing by the application program 219.
As the discussion above indicates, edit control processing in prior systems is performed through cooperation between an application program and an operating system. An example of such cooperation will now be described with reference to the components of the system 200. The example below illustrates the system processing which occurs when the user positions an insertion pointer in the text box 101 and enters data using the input device 205.
First, the operating system 215 stores the entered data in its system queue 225. In general, the operating system has initial access to all data entered through the input device 205 (e.g., mouse active data and mouse button down data). The message loop code 229 of the application program 219 retrieves all data stored in the system queue. In general, the application program 219 is the component of the computer system 200 that analyzes the retrieved data to determine the appropriate processing steps to perform. For example, upon receiving the retrieved data, the main window code 221 examines the data to determine which soft-ware module in the application program 219 should be invoked to process the retrieved data. In the present example, the main window code 221 sends the retrieved data to the application text box code 223 because the data was entered while the insertion pointer was positioned in the text box 101. Thus, data entered in the text box 101 is sent directly from the main window code 221 to the application text box code 223. The application text box code 223 examines the retrieved data and determines that the data was entered for display in the text box 101. Therefore, the application text box code 223 sends the retrieved data, along with a TextOut request, to the operating system text box code 217. The operating system text box code 217 displays the entered data in the text box 101.
In prior systems edit controls were of a fixed size. Neither prior operating systems nor prior applications were programmed to modify the size of an edit control. Thus, users of these systems were required to scroll data into and out of the edit controls.